package com.wnnight.wys.security;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.User;

import java.util.Collection;

@Getter
@Setter
@ToString
public class OaUser extends User {
    public OaUser(String username, String password, Collection<? extends GrantedAuthority> authorities) {
        super(username, password, authorities);
    }

    public OaUser(int id, String username, String password, int roleId, Collection<? extends GrantedAuthority> authorities) {
        this(username, password, authorities);
        this.id = id;
        this.roleId = roleId;
    }

    private int id;
    private int roleId;
}
